<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.13/vue.js"></script>
</head>
<body>
<div id="app5">
    <div>
        <button id="firstBtn" @click="testClick()">{{testMsg}}</button>
        <div v-for="item in arr">{{item}}</div>

    </div>
</div>

<script>

    var vue = new Vue({
        el: '#app5',
        data: {
            testMsg: "原始值",
            arr: []
        },
        methods: {
            testClick: function () {
                this.arr.push("1");
            }
        },
        watch: {
            arr(newVal, oldVal) {
                console.log('oldVal:', oldVal)
                console.log('newVal:', newVal)
            }
        }
    });
</script>

</body>
</html>